package com.wnx.job.modules.ums.controller;


import com.wnx.job.common.api.Const;
import com.wnx.job.common.api.ResultData;
import com.wnx.job.modules.ums.model.UmsType;
import com.wnx.job.modules.ums.service.UmsTypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author wangnaixing
 * @since 2021-12-17
 */
@Slf4j
@RestController
@RequestMapping("/ums/umsType")
@Api(tags = "TypeController",description = "类型管理")
public class UmsTypeController {

    @Resource
    private UmsTypeService typeService;

    /**
     * 查询全部类型
     * @return
     */
    @GetMapping("/findAll")
    @ApiOperation("查询全部类型")
    public ResultData<List<UmsType>> findAll(){
        log.info("【=====系统正在查询全部类型集合中。。。。=========】");
        List<UmsType> typeList =  typeService.list();
        log.info("【=====系统正在查询全部类型集合成功了！！！=========】");
        return ResultData.success(Const.QUERY_DICT_SUCCESS,typeList);
    }

}

